<?php
// +----------------------------------------------------------------------
// | OneThink [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013 http://www.onethink.cn All rights reserved.
// +----------------------------------------------------------------------
// | Author: 麦当苗儿 <zuojiazi@vip.qq.com> <http://www.thinkphp.cn>
// +----------------------------------------------------------------------

/**
 * 前台配置文件
 * 所有除开系统级别的前台配置
 */
return array(

    // 预先加载的标签库
    'TAGLIB_PRE_LOAD'     =>    'OT\\TagLib\\Article,OT\\TagLib\\Think',
        
    /* 主题设置 */
    //'DEFAULT_THEME' =>  'default',  // 默认模板主题名称

    /* 数据缓存设置 */
    'DATA_CACHE_PREFIX' => 'onethink_', // 缓存前缀
    'DATA_CACHE_TYPE'   => 'File', // 数据缓存类型

    /* 文件上传相关配置 */
    'DOWNLOAD_UPLOAD' => array(
        'mimes'    => '', //允许上传的文件MiMe类型
        'maxSize'  => 5*1024*1024, //上传的文件大小限制 (0-不做限制)
        'exts'     => 'jpg,gif,png,jpeg,zip,rar,tar,gz,7z,doc,docx,txt,xml', //允许上传的文件后缀
        'autoSub'  => true, //自动子目录保存文件
        'subName'  => array('date', 'Y-m-d'), //子目录创建方式，[0]-函数名，[1]-参数，多个参数使用数组
        'rootPath' => './Uploads/Download/', //保存根路径
        'savePath' => '', //保存路径
        'saveName' => array('uniqid', ''), //上传文件命名规则，[0]-函数名，[1]-参数，多个参数使用数组
        'saveExt'  => '', //文件保存后缀，空则使用原后缀
        'replace'  => false, //存在同名是否覆盖
        'hash'     => true, //是否生成hash编码
        'callback' => false, //检测文件是否存在回调函数，如果存在返回文件信息数组
    ), //下载模型上传配置（文件上传类配置）

    /* 编辑器图片上传相关配置 */
    'EDITOR_UPLOAD' => array(
        'mimes'    => '', //允许上传的文件MiMe类型
        'maxSize'  => 2*1024*1024, //上传的文件大小限制 (0-不做限制)
        'exts'     => 'jpg,gif,png,jpeg', //允许上传的文件后缀
        'autoSub'  => true, //自动子目录保存文件
        'subName'  => array('date', 'Y-m-d'), //子目录创建方式，[0]-函数名，[1]-参数，多个参数使用数组
        'rootPath' => './Uploads/Editor/', //保存根路径
        'savePath' => '', //保存路径
        'saveName' => array('uniqid', ''), //上传文件命名规则，[0]-函数名，[1]-参数，多个参数使用数组
        'saveExt'  => '', //文件保存后缀，空则使用原后缀
        'replace'  => false, //存在同名是否覆盖
        'hash'     => true, //是否生成hash编码
        'callback' => false, //检测文件是否存在回调函数，如果存在返回文件信息数组
    ),

    /* 模板相关配置 */
    'TMPL_PARSE_STRING' => array(
        '__PUBLIC__' => __ROOT__ . '/Public',
        '__STATIC__' => __ROOT__ . '/Public/static',
        '__ADDONS__' => __ROOT__ . '/Public/' . MODULE_NAME . '/Addons',
        '__IMG__'    => __ROOT__ . '/Public/' . MODULE_NAME . '/images',
        '__CSS__'    => __ROOT__ . '/Public/' . MODULE_NAME . '/css',
        '__JS__'     => __ROOT__ . '/Public/' . MODULE_NAME . '/js',
    ),

    /* SESSION 和 COOKIE 配置 */
    'SESSION_PREFIX' => 'onethink_home', //session前缀
    'COOKIE_PREFIX'  => 'onethink_home_', // Cookie前缀 避免冲突

    /**
     * 附件相关配置
     * 附件是规划在插件中的，所以附件的配置暂时写到这里
     * 后期会移动到数据库进行管理
     */
    'ATTACHMENT_DEFAULT' => array(
        'is_upload'     => true,
        'allow_type'    => '0,1,2', //允许的附件类型 (0-目录，1-外链，2-文件)
        'driver'        => 'Local', //上传驱动
        'driver_config' => null, //驱动配置
    ), //附件默认配置

    'ATTACHMENT_UPLOAD' => array(
        'mimes'    => '', //允许上传的文件MiMe类型
        'maxSize'  => 5*1024*1024, //上传的文件大小限制 (0-不做限制)
        'exts'     => 'jpg,gif,png,jpeg,zip,rar,tar,gz,7z,doc,docx,txt,xml', //允许上传的文件后缀
        'autoSub'  => true, //自动子目录保存文件
        'subName'  => array('date', 'Y-m-d'), //子目录创建方式，[0]-函数名，[1]-参数，多个参数使用数组
        'rootPath' => './Uploads/Attachment/', //保存根路径
        'savePath' => '', //保存路径
        'saveName' => array('uniqid', ''), //上传文件命名规则，[0]-函数名，[1]-参数，多个参数使用数组
        'saveExt'  => '', //文件保存后缀，空则使用原后缀
        'replace'  => false, //存在同名是否覆盖
        'hash'     => true, //是否生成hash编码
        'callback' => false, //检测文件是否存在回调函数，如果存在返回文件信息数组
    ), //附件上传配置（文件上传类配置）

    /*微信网页登录*/
    'WECHATLOGIN' => array(
        'appId'      => 'wx1330c29b9a290784',
        'appSecret'  => '61dd6aca6e2fe0d18dcc0032d2db0583'
    ),
    /*'WECHATLOGIN' => array(
        'appId'      => 'wx0722be5b0604513f',
        'appSecret'  => '33b5ec5010f1bf145017fdb05b3f6ae6'
    ),*/

    /*扫码支付参数*/
    'WECHAT' => array(
        'appid' => 'wxc71d2806d6a7ee35',
        'mch_id' => '1492789532',
        'key' => 'NqQzKpSMkToaayk3n59MTZG5SMQg7vL2',
        'secret'=>'7b15e68567c66f3f1a020298103aa86b',
        'notify_url' => 'https://www.dscore.cn/home/order/replyNotify'
    ),

    /*支付宝扫码支付配置*/
    'ALIPAY' => array(
        'appid' => '2017111709985974',
        'privateKey' => 'MIIEoQIBAAKCAQEA64jIOJ9ea/X5KF2UCYQxKphj6zcsun35jc6IiFdBgTkctOesX2ndD3BjRvIVItyg9Hprc40ApAx7SVTVkAN2VfG4qAcTQKMCe5jE4yvKC5nFYVXFoyQAisJEeJtJ0f0sfCtN2XwPBzzrJObF6g/h2Q1LGiwBigLuIWyn+YLYHrRphXrB/Mp9SmEGQ8lNXRo2YOzJ48alYo8AwqXh2jnmhGCaXtad2ESrIh6gDs2gJFoTjnAsDQvzRpzq2APPIILD688BivFA7ca+hIdtYCysH8p/s14wAR7UrmdxbNkPjbgD1EJ6x0xv1m5839ZbQZrObsPpfs6sUuctfpa7Re0JxwIDAQABAoIBAQDkXyODg0LR+xUyhklbUMk7O7bmAgFkcXDehjrrt27UFMQ4w8jmWob0yUv5JhBIVRPa+DfnOfg9F70SRSctE65RdqZMhU+thGCL5nxAp9ynktlGnxua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mfrdJ/xD7PMS+eJg==',
        'aliPublicKey' => 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApDHl6+rn59trjvxMefrgq52JYvgxsvMcNBM//CarHh0LNx6u1iseZNB8kuxAm3TyxUvA0vnxIb0NzejEwewFmAA1Rn6Es88iXaw+6bJq7m5wm2FZUmeetywlcYc6NQLCtPXV6oizBEwNBc1AxKxnbZG2INide5Iy81Y1gqWj2DrGV/rWQrq1Ym3SZ9t+XfB1IG+VleWpwVhkUBouXK9pL5cWZprQFPj/ldsey+cracxdV+tf9/QLrn9QPsA3LdS7zl7XjVAC9DRzf/w7h1nJn31FcBOz/vhD3YAazbHMg+hlpnWfUFhFAdVMtSSpzJ3j/1+ky8tkbdeLu6uJcRiOoQIDAQAB',
        'notify_url' => 'https://www.dscore.cn/home/order/aliNotify',
        'return_url' => 'https://www.dscore.cn/home/order/aliReturn',
    ),
);
